package com.taotao.service.impl;

import com.taotao.service.TbContentService;
import com.taotao.TaotaoResult;
import com.taotao.mapper.TbContentMapper;
import com.taotao.pojo.TbContent;
import com.taotao.pojo.TbContentExample;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author evader
 * @date 2020-09-27 16:47
 */
@Service
public class TbContentServiceImpl implements TbContentService {
    @Autowired
    private TbContentMapper tbContentMapper;

    @Override
    public TaotaoResult selectByExample(TbContentExample example) {
        example.createCriteria().andCategoryIdEqualTo(89L);
        List<TbContent> tbContents = tbContentMapper.selectByExample(example);
        TaotaoResult taotaoResult = TaotaoResult.ok(tbContents);
        return taotaoResult;
    }
}
